<?php

/**
 * Setlanguage actions.
 *
 * @package    clubs
 * @subpackage Setlanguage
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
 */
class SetlanguageActions extends sfActions
{
  /**
   * Executes index action
   *
   */
  public function executeEn()
  {
   $this->getUser()->setCulture('en');
    $signout_url = sfConfig::get('app_sf_guard_plugin_success_signout_url', str_replace('/ru/','/en/',$this->getRequest()->getReferer()));
    $this->redirect('' != $signout_url ? $signout_url : '@homepage');
   //$this->redirect('Mainpage/show');
  }
  public function executeRu()
  {
    $this->getUser()->setCulture('ru');
    //$this->redirect('Mainpage/show');
    $signout_url = sfConfig::get('app_sf_guard_plugin_success_signout_url',  str_replace('/en/','/ru/',$this->getRequest()->getReferer()));
    $this->redirect('' != $signout_url ? $signout_url : '@homepage');
  }
public function executeUk()
  {
    $this->getUser()->setCulture('uk');
    //$this->redirect('Mainpage/show');
    $signout_url = sfConfig::get('app_sf_guard_plugin_success_signout_url', $this->getRequest()->getReferer());
    $this->redirect('' != $signout_url ? $signout_url : '@homepage');
  }
}
